$(document).ready(function() {
    $.ajax({
        url: "/api/square?x=4.6"
    }).then(function(data) {
       $('#apitest').text(data.y);
    });
});
